﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Optimizations
{
    public abstract class StaticModification : IOptimizationModification
    {
        public virtual bool Apply()
        {
            if (Parent != null) Parent.Modifications.Remove(this);
            return true;
        }

        public virtual void Reverse()
        {
            if (Parent != null) Parent.Modifications.Add(this);
        }

        public abstract IEnumerable<object> Impact { get; }

        public StaticModificationPattern Parent { get; set; }
    }
}
